package com.gg.common.mapper;

import com.gg.common.pojo.SysMenus;
import com.gg.common.view.ParentMenuView;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysMenusMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(SysMenus record);

    int insertSelective(SysMenus record);

    SysMenus selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SysMenus record);

    int updateByPrimaryKey(SysMenus record);

    /**
     *  查询登入人具有的角色 角色具有的菜单
     * @return ParentMenuView
     * @throws Exception
     */
    List<ParentMenuView> menus(int userId) throws Exception;

    /**
     * 查询登入人具有的角色 角色具有的菜单
     * @param userId
     * @return SysMenus
     * @throws Exception
     */
    List<SysMenus> searchQueryMenuAll(int userId) throws Exception;
}